package com.jbh.request.bean

import com.jbh.request.utils.MD5Util

class AppRequestBaseData(
    var UserId: String = "",
    val Device: Int = 3,
    var Time: Long = 0,
    var VerId: String = "",
    var OnlineMark: String = "",
) {
    private val key = "YlQ6iR#ox4BEqP4vchhI3_YHWFNFysQU"
    fun  body(): MutableMap<String, Any> {

        return mutableMapOf<String, Any>().apply {
            this["UserId"] = UserId
            this["Device"] = 3
            this["Time"] = Time
            this["VerId"] = VerId
            this["OnlineMark"] = OnlineMark
            this["Sign"] = MD5Util.getMD5(
                StringBuilder().append(UserId + "|" + Device + "|" + Time + "|" + VerId + "|" + key + "|" + OnlineMark)
                    .toString()
            )
        }
    }
}
